package com.ea.eadp.nexus.test.pageDefinition.mobile;

import com.ea.eadp.nexus.test.common.PageOperation;
import com.ea.eadp.nexus.test.common.TestUtil;
import com.ea.eadp.nexus.test.pageDefinition.BasePage;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;


public class MobileBasePage extends BasePage {
    private String visibleElementId;

    public MobileBasePage(WebDriver driver, Class<?> cla, String visibleElementId) {
        super(driver, cla);
        this.visibleElementId = visibleElementId;
    }


    public void clickBlank(String xpath) {
        driver.findElement(By.xpath(xpath)).click();
        TestUtil.sleep(1);
    }

    public void waitPageLoadCompleted() {
        PageOperation.WebDriverWait(driver, visibleElementId);
    }
}